<template>
	<u-sticky bg-color="#ffffff" h5-nav-height="0">
		<u-tabs active-color="#117B12" :list="tabsList" :is-scroll="false" v-model="tabsCurrent"
			@change="tabsChange" :font-size="28"></u-tabs>
	</u-sticky>
	<u-gap height="20"></u-gap>
	<view class="u-p-l-20 u-p-r-20" v-for="v in list">
		<view class="bgw box-radius u-p-28 u-font-24">
			<view class="u-flex u-font-28">
				<view class="u-flex-1">
					提现金额
				</view>
				<view class="">
					-{{v.total}}
				</view>
			</view>
			<view class="u-p-t-15">
				<text class="u-content-color">提现状态：</text>
				<text class="color-orange" v-if="v.withdrawalStatus == 0">待审核</text>
				<text class="color-green" v-if="v.withdrawalStatus == 1">已发放</text>
				<text class="color-red" v-if="v.withdrawalStatus == 2">已驳回</text>
			</view>
			<!-- <view class="u-p-t-15 u-content-color">
				提现编号：{{v.code}}
			</view> -->
			<view class="u-p-t-10 u-content-color">
				手续费用：￥{{v.serviceCharge}}
			</view>
			<view class="u-p-t-10 u-content-color">
				实际到账：￥{{v.actually}}
			</view>
			<view class="u-content-color u-p-t-10">
				提现时间：{{v.created}}
			</view>
			<view class="u-content-color u-p-t-10" v-if="v.note">
				备注：{{v.note}}
			</view>
		</view>
		<u-gap height="20"></u-gap>
	</view>
	<g-loadmore :status="loadmoreStatus"></g-loadmore>
	<u-gap height="20"></u-gap>
</template>
<script setup>
	import mixins from '@/common/js/mixins.js';
	import mixinList from '@/common/js/mixinList.js';
	import store from '@/store/index.js'; //需要引入store
	import {
		ref,
		reactive,
		computed,
		getCurrentInstance,
		watch
	} from 'vue'
	import {
		onReady,
		onLoad,
		onShow
	} from '@dcloudio/uni-app'
	const {
		proxy,
	} = getCurrentInstance()
	const {
		nav,
		navLogin
	} = proxy.$util;
	const {
		total,
		current_page,
		page_size,
		last_page,
		apiPath,
		loading,
		list,
		searchParams,
		getList,
		getNextList,
		loadmoreStatus,
		searchClear,
		searchConfirm
	} = mixinList();
	const tabsCurrent = ref(0)
	const tabsList = [{
			name: '全部',
			id: ''
		},
		{
			name: '待审核',
			id: 0
		},
		{
			name: '已发放',
			id: 1
		},
		{
			name: '已驳回',
			id: 2
		},
	];
	const tabsChange = (index) => {}
	watch(tabsCurrent, async (val) => {
		await getList(1)
	})
	apiPath.value = 'getWithdrawalMe'
	searchParams.withdrawalStatus = computed(() => {
		return tabsList[tabsCurrent.value].id
	});
	const statisticsData = ref({})

	// const bindStatusChange = () => {}
	onReady(() => {

	})
	onLoad((d) => {
		getList(1)
	})
	onShow(() => {

	})
</script>

<style lang="scss" scoped>

</style>